public class TestLinkedlist {
    public static void main(String[] args) {
        Linkedlist linkedlist = new Linkedlist();
        //linkedlist.createList();
        linkedlist.addFirst(1);
        linkedlist.addFirst(2);
        linkedlist.addFirst(3);
        linkedlist.display();
        System.out.println(linkedlist.size());
        System.out.println("==========");
        linkedlist.addLast(4);
        linkedlist.addLast(5);
        linkedlist.addLast(6);
        linkedlist.display();
        System.out.println();
        System.out.println("=========");
        linkedlist.addIndex(2,9);
        linkedlist.display();
        System.out.println(linkedlist.contains(90));
        System.out.println();
        //System.out.println("要删除所有节点");
        //linkedlist.clear();
        //linkedlist.display();
        linkedlist.remove(1);
        linkedlist.remove(9);
        linkedlist.display();

    }
}
